<?php
namespace app\publics\controller\api;
use app\ApiController;

/*------------------------------------------------------ */
//-- 公共调用
/*------------------------------------------------------ */
class Index extends ApiController
{
	/*------------------------------------------------------ */
	//-- 获取全站设置
	/*------------------------------------------------------ */
 	public function setting(){
		$key_str = input('key_str', '');
		$data['code'] = 1;
		$data['data'] = settings($key_str);
		return $this->ajaxReturn($data);
	}
	public function uploadapp(){
	
        $result = $this->_upload($_FILES['file'],'appios/');
       
        if ($result['error']) {
            $data['code'] = 0;
            $data['msg'] = $result['info'];
		}else{
			$data['code'] = 1;
			$data['url'] = '/'.$result['info'][0]['savepath']. $result['info'][0]['savename'];
            
		}
		return $this->ajaxReturn($data);
    }

}
